package com.example.attempt.service.impl;

import com.example.attempt.entity.Assessment;
import com.example.attempt.entity.Evaluation;
import com.example.attempt.mapper.AssessmentMapper;
import com.example.attempt.service.AssessmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AssessmentServiceImpl implements AssessmentService {
    @Autowired
    AssessmentMapper assessmentMapper;

    @Override
    public List<Assessment> queryAll(){
        return assessmentMapper.queryAll();
    }

    @Override
    public List<Assessment> queryBySid(String sid){
        return assessmentMapper.queryBySid(sid);
    }

    @Override
    public List<Assessment> queryByTid(String tid){
        return assessmentMapper.queryByTid(tid);
    }

    @Override
    public Assessment getAsseByHidSid(int hid, String sid){return assessmentMapper.getAsseByHidSid(hid,sid);}

    @Override
    public List<Evaluation> getAsseBySid(String sid, int hid){
        return assessmentMapper.getAsseBySid(sid, hid);
    }

    @Override
    public List<Evaluation> getAsseByTid(String tid, int hid){
        return assessmentMapper.getAsseByTid(tid, hid);
    }

    @Override
    public List<Evaluation> getAsseByAid(String aid, int hid){
        return assessmentMapper.getAsseByAid(aid, hid);
    }

    @Override
    public int addAsse(Assessment asse){
        assessmentMapper.addAsse(asse);
        return 0;
    }

    @Override
    public int deleteAsse(int submitId){
        assessmentMapper.deleteAsse(submitId);
        return 0;
    }

    @Override
    public Assessment selectBySid1(int submitId, String sid){
        return assessmentMapper.selectBySid1(submitId, sid);
    }

    @Override
    public Assessment selectBySid2(int submitId, String sid){
        return assessmentMapper.selectBySid2(submitId,sid);
    }

    @Override
    public Assessment selectBySid3(int submitId, String sid){
        return assessmentMapper.selectBySid3(submitId,sid);
    }

    @Override
    public int updateS1comment(int submitId, String comment){
        assessmentMapper.updateS1comment(submitId, comment);
        return 0;
    }

    @Override
    public int updateS2comment(int submitId, String comment){
        assessmentMapper.updateS2comment(submitId, comment);
        return 0;
    }

    @Override
    public int updateS3comment(int submitId, String comment){
        assessmentMapper.updateS3comment(submitId, comment);
        return 0;
    }

    @Override
    public int updateTcomment(int submitId, String comment){
        assessmentMapper.updateTcomment(submitId, comment);
        return 0;
    }

    @Override
    public int updateAcomment(int submitId, String comment){
        assessmentMapper.updateAcomment(submitId, comment);
        return 0;
    }

    @Override
    public int updateAsse(Assessment asse){
        assessmentMapper.updateAsse(asse);
        return 0;
    }

}
